package com.yb0os1.mapper;

import com.yb0os1.entity.ShoppingCart;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

;


@Mapper
public interface ShoppingCartMapper {
    ShoppingCart selectUserAndDishID(ShoppingCart shoppingCart);

    void update(ShoppingCart goods);

    void insert(ShoppingCart shoppingCart);

    List<ShoppingCart> list(ShoppingCart shoppingCart);

    void deleteOne(ShoppingCart shoppingCart);

    @Delete("delete from shopping_cart where user_id = #{userId}")
    void cleanAll(Long userId);

    void insertBatch(List<ShoppingCart> shoppingCartList);
}
